import request from '@/utils/request'

// 查询考试试卷列表
export function listPaper(query) {
  return request({
    url: '/paper/paper/list',
    method: 'get',
    params: query
  })
}

// 查询考试试卷列表
export function listPaperExam(query) {
  return request({
    url: '/paper/exam/list',
    method: 'get',
    params: query
  })
}

// 查询考试试卷列表
export function listPaperRecord(query) {
  return request({
    url: '/paper/exam/record',
    method: 'get',
    params: query
  })
}

// 查询考试试卷详细
export function getPaper(id) {
  return request({
    url: '/paper/paper/' + id,
    method: 'get'
  })
}

// 查询考试试卷详细
export function getExamInfo(id) {
  return request({
    url: '/paper/exam/' + id,
    method: 'get'
  })
}


// 考生获取答卷阅卷后详细信息
export function getExamDetail(id) {
  return request({
    url: '/paper/exam/getExamDetail/' + id,
    method: 'get'
  })
}

// 提交答卷
export function submitPaper(id,data) {
  return request({
    url: '/paper/exam/submitPaper/' + id,
    method: 'post',
    data: data
  })
}



// 新增考试试卷
export function addPaper(data) {
  return request({
    url: '/paper/paper',
    method: 'post',
    data: data
  })
}

// 修改考试试卷
export function updatePaper(data) {
  return request({
    url: '/paper/paper/updatePaper',
    method: 'post',
    data: data
  })
}

// 修改试卷基本信息
export function editPaper(data) {
  return request({
    url: '/paper/paper',
    method: 'put',
    data: data
  })
}

// 创建考试试卷
export function createPaper(data) {
  return request({
    url: '/paper/paper/createPaper',
    method: 'post',
    data: data
  })
}


// 删除考试试卷
export function delPaper(id) {
  return request({
    url: '/paper/paper/' + id,
    method: 'delete'
  })
}

// 复制试卷
export function copyPaper(id) {
  return request({
    url: '/paper/paper/copyPaper/' + id,
    method: 'get'
  })
}

// 获取抽题组卷试题
export function getQuestions(data) {
  return request({
    url: '/paper/paper/getQuestions',
    method: 'post',
    data: data
  })
}


// 导出对应试卷所有考生考试列表
export function exportPapers(id) {
  return request({
    url: '/paper/paper/exportPapers/' + id,
    method: 'get'
  })
}

// 导出对应试卷所有考生考试进度监测
export function exportMonitor(uuid) {
  return request({
    url: '/paper/paper/exportMonitor/' + uuid,
    method: 'get'
  })
}

// 下载导出文件
export function downLoadExport(uuid) {
  return request({
    url: '/paper/paper/downLoadExport/' + uuid,
    method: 'get'
  })
}

// 提交答卷
export function face(id,imageType,data) {
  return request({
    url: '/paper/exam/face/' + id+'/'+imageType,
    method: 'post',
    data: data
  })
}